<!--main-->
<div class="midder">
	<div class="mc">
    	<h1>我的收件箱({{unreadnum}}封未拆)</h1>
    	<div class="cleft">
        	{{partial('message/menu')}}   
            <div class="clear"></div>
            <div id="db-timeline-hd">
                <ul class="menu-list">
                	{% for key, item in inmenu%}
                    	{% if ik==key %}
                        	<li class="on"><a href="{{item['url']}}">{{item['text']}}</a></li>
                        {% else %}
                        	<li><a href="{{item['url']}}">{{item['text']}}</a></li>
                        {% endif %}
                    {% endfor %}
                </ul>
            </div>  
		 <form  method="post" onSubmit="return isConfirmed" action="{{url('home/message/doing?d=all')}}">            
            <table class="olt">
              <tbody>
                <tr>
                  <td class="pl" style="width:112px;"><span class="doumail_from">来自</span></td>
                  <td width="20"></td>
                  <td class="pl">话题</td>
                  <td class="pl" style="width:110px;">时间</td>
                  <td class="pl" style="width:40px;" align="center">选择</td>
                  <td class="pl" style="width:120px;visibility:hidden;border-bottom:none" align="center">mail_options</td>
                </tr>
               {% if arrMessage %}
               {% for item in arrMessage%}         
                <tr>
                  <td>
                  {% if item['userid'] is empty %}
                 	 <span class="sys_doumail">系统邮件</span>
                  {% else %}
                  	<span class="doumail_from">{{item['user']['username']}}</span> 
                  {% endif %}
                  </td>
                  <td class="m" align="center">&gt;</td>
                  <td><a href="{{url('home/message/show/'~item['messageid'])}}">{{item['title']}}</a></td>
                  <td>{{item['addtime']}}</td>
                  <td align="center"><input name="messageid[]" value="{{item['messageid']}}" type="checkbox"></td>
                  <td style="display: none;" class="mail_options">
                  {% if ik != 'spam' %}
                  <a rel="direct" class="post_link" 
                  href="{{url('home/message/doing?d=spam&messageid='~item['messageid'])}}">垃圾消息</a>
                  {% endif %}
                  <a onClick="return confirm('真的要删除消息吗？')" class="post_link" 
                  href="{{url('home/message/doing?d=del&type=inbox&messageid='~item['messageid'])}}">删除</a>
                  </td>
                </tr>
               {% endfor %}
               {% endif %}
                <tr>
                  <td colspan="4" align="right">
                    <input name="type" value="inbox" type="hidden">
                   {% if ik == 'spam' %}
                    <input name="mc_submit" value="删除" data-confirm="真的要删除短消息吗?" type="submit">
				   {% endif %}
                   {% if ik == 'unread' or ik == 'inbox' %}
                    <input name="mc_submit" value="删除" data-confirm="真的要删除短消息吗?" type="submit">
                    <input name="mc_submit" value="垃圾消息" 	type="submit">
                    <input name="mc_submit" value="标记为已读"  type="submit">
				   {% endif %}                                                         
                  </td>
                  <td align="center"><input name="checkAll" value="checkAll" onclick="ToggleCheck(this);" type="checkbox"></td>
                </tr>
              </tbody>
            </table>
        </form>    
        </div>
        <div class="cright">
			{{partial('message/rightmenu')}}   
        </div>
    </div>
</div>
